Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing Extensions and Drivers /
Chapter 4 - Printing Messages / Printing Messages Reference
Printing Messages / Vector Imaging Messages


GXVectorVectorizeShape

QuickDraw GX sends the GXVectorVectorizeShape message to convert a complex shape into simpler, device-level shapes such as polygons. You can override the GXVectorVectorizeShape message to change the plotting of particular shapes. Your override of the GXVectorVectorizeShape message must match the following formal declaration:

OSErr MyVectorVectorizeShape (gxShape aShape, long penIndex, 
                  gxVectorShapeDataRec *aVectorShapeDataRec);
aShape
The shape object to be vectorized.
penIndex
The index of the pen to draw the shape.
aVectorShapeDataRec
On return, a pointer to a vector shape structure that contains the vector data created from the shape.
function result
An error code. The value noErr indicates that the operation was successful.
DESCRIPTION
QuickDraw GX's default implementation of GXRenderPage sends the GXVectorVectorizeShape message when a shape is ready to be converted into simpler device-level shapes. It sends the message to vectorize a specified shape (convert it into line segments). It sends the message after all transfer modes are resolved and all clipping and transforms have been concatenated.

QuickDraw GX's default implementation of this message converts shapes into polygons.

You can override this message to effect the plotting of particular shape types. You may find this useful for plotters that can handle certain shapes more easily than the shapes provided by the default implementation. You can completely remove undesired shapes, handle certain shapes entirely, modify shapes prior to forwarding the message, and send some shapes through unmodified.

The GXVectorVectorizeShape message is initiated before any style mappings are applied to the shape and before it is converted into a low-level shape. The message is invoked after clipping, color sorting, and transfer-mode resolution are complete. Before the message is sent, all the parent clips and mappings are concatenated with the shape's clip and mapping. The shape is left as close to its original form as possible. For example, text remains text shape and is not converted into a path.

You can override this message to customize rendering of certain shapes on your vector device. For example, if you prefer to use the device's native fonts to plot text, glyph, and layout shapes, you can override this message. Note that it is your responsibility to apply style and transforms to the shape.

SPECIAL CONSIDERATIONS
You never send the GXVectorVectorizeShape message yourself.

You can totally override the GXVectorVectorizeShape message, or you can partially override it to modify the default processing of certain shape types.

RESULT CODES
gxSegmentLoadFailedErrA required code segment could not be found,
or there was not enough memory to load it.
gxPrUserAbortErrThe user has canceled printing.
SEE ALSO
The GXRenderPage message is described on page 4-96.

The vector shape structure is described on page 4-31.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help